/**
 * 频道请求模块
 */
import request from '@/utils/request'

/**
 * 获取所有频道
 */
export const getAllChannels = () => {
    return request({
        method: 'GET',
        url: '/channel/all'
    })
}

/**
 * 添加用户频道
 */
export const addUserChannel = data => {
    return request({
        // GET POST PUT DELETE  PATCH(部分更新)
        method: 'POST',
        url: '/channel/add',
        data
    })
}

/**
 * 删除用户频道
 */
export const deleteUserChannel = data => {
    return request({
        method: 'DELETE',
        url: `/channel/delete`,
        data
    })
}